/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gennajavainstaller;

import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;


/**
 *
 * @author GiulioGenna
 */
public class Utils {
   
    public static Process exec;
    public Process process;
    public int exit=3;
    
    
    public void eseguiExe() throws InterruptedException{  
        
        Runtime rt=Runtime.getRuntime();
        
        try {
            
            
            exec= rt.exec("./AvvioSprint.exe");
            
        } catch (IOException ex) {
            JOptionPane.showMessageDialog(null, ex.getCause());
            Logger.getLogger(Utils.class.getName()).log(Level.SEVERE, null, ex);
        }
        
       
}
    public static void killProcess(Process p){
        if(p!=null)
            p.destroy();
            System.exit(0);
            
    }
    
   public static void newFile() throws IOException{
       
       File file= new File("inst.txt");
       file.createNewFile();
   }
            
    }
        
    
    
